package string;

public class ValueOfDemo {

    public static void main(String[] args) {
        //String提供了一组重载的静态方法:valueof
        //作用是将基本数据类型转换为字符串
        int a=123;
        String s=String.valueOf(a);
        System.out.println("s = " + s);
        double b=3.14;
        String s1=String.valueOf(b);
        System.out.println("s1 = " + s1);
    }
}
